package 王道.数据结构;

import java.util.Arrays;

//顺序表定义
public class SqList {

    private static final int MAXSIZE = 100;
    public int[] data = new int[MAXSIZE];
    public int length;

    @Override
    public String toString() {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < this.length; i++) {
            s.append(data[i]);
            if(i!=length-1)
                s.append(", ");
        }
        return "SqList{" +
                "data=" + s +
                ", length=" + length +
                '}';
    }
}
